<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

class Member extends CI_Controller {

    function __construct() { //import class
        parent::__construct();
        $this->load->helper('form', 'url');
        $this->load->model('leo');
    }

    function tru() { //cek session login
        $log = $this->session->all_userdata();
        if (!isset($log) || $log['log'] != TRUE || $log['previlege_id'] != 2) {
            $this->session->sess_destroy();
            redirect('main');
        }
    }

    function index() { //home page admin
        $this->tru();
        $this->load->view('member/home');
    }

    function logout() { //logout
        $this->tru();
        $this->session->sess_destroy();
        redirect();
    }

}

/* End of file member.php */
/* Location: ./application/controllers/member.php */